<template>
  <div class="markdown" v-html="markdownLib.render(markdownHtml)"></div>
</template>

<script lang="ts" setup>
import { computed } from 'vue';
import { markdownLib } from '@/utils/markdown';
const props = defineProps({
  content:{
    type:String,
    default:''
  },
  ing:{
    type:Boolean,
    default:false
  },
  last:{ // 是否是最后一条  页面中是多个的时候
    type:Boolean,
    default:true
  },
})
const markdownHtml = computed(() =>{
  return props.ing && props.last ? `${props.content}<span class="shape"><span class="dot1"></span><span class="dot2"></span></span>` : props.content
})

</script>

<style lang="scss" scoped>


</style>